/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.source.entity.title;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.source.entity.EleSourceGroup;
import com.thinkgem.jeesite.modules.sys.entity.User;

import org.hibernate.validator.constraints.Length;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 * 标题管理Entity
 * @author ZC
 * @version 2017-06-16
 */
@XmlRootElement(name="titlecfg")
public class EleSourceTitle extends DataEntity<EleSourceTitle> {
	
	private static final long serialVersionUID = 1L;
	private String name;
	private String content;		// 标题内容
	private String fgcolor;		// 文字颜色
	private String bgcolor;		// 背景色
	private String align;		// align

	private String size;		// 字体大小
	private String area;
	private Integer alpha;

	private String groupId;
	private EleSourceGroup group;
	@XmlTransient
	public EleSourceGroup getGroup() {
		return group;
	}

	public void setGroup(EleSourceGroup group) {
		this.group = group;
	}
	public List<User> users = null;

	@XmlTransient
	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
	@XmlTransient
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	public EleSourceTitle() {
		super();
	}

	public EleSourceTitle(String id){
		super(id);
	}
	@XmlTransient
	@Length(min=1, max=255, message="标题内容长度必须介于 1 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@XmlElement(name = "content")
	@Length(min=1, max=255, message="标题内容长度必须介于 1 和 255 之间")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@XmlElement(name = "fgcolor")
	@Length(min=0, max=255, message="文字颜色长度必须介于 0 和 255 之间")
	public String getFgcolor() {
		return fgcolor;
	}

	public void setFgcolor(String fgcolor) {
		this.fgcolor = fgcolor;
	}
	
	@XmlElement(name = "bgcolor")
	@Length(min=0, max=255, message="背景色长度必须介于 0 和 255 之间")
	public String getBgcolor() {
		return bgcolor;
	}

	public void setBgcolor(String bgcolor) {
		this.bgcolor = bgcolor;
	}
	@XmlElement(name = "align")  
	@Length(min=0, max=100, message="字体颜色长度必须介于 0 和 100 之间")
	public String getAlign() {
		return align;
	}

	public void setAlign(String align) {
		this.align = align;
	}
	@XmlElement(name = "size")
	@Length(min=0, max=11, message="字体大小长度必须介于 0 和 11 之间")
	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}
	@XmlTransient
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public Integer getAlpha(){
		return alpha;
	}

	public void setAlpha(Integer alpha){
		this.alpha = alpha;
	}
}